package org.zhs.decorate.demo2;

/**
 * Author: zhs
 * Date: 16/05/2024 17:19
 * Description:
 */
public class Main {
    public static void main(String[] args) {
        StringDataSource fileDataSource = new StringDataSource();
        EncryptionDecorator encryptionDecorator = new EncryptionDecorator(fileDataSource);
        CompressionDecorator compressionDecorator = new CompressionDecorator(fileDataSource);

        encryptionDecorator.writeData("你好啊，装饰器模式！");
        System.out.println("增强后： readData： " + compressionDecorator.readData());
    }
}
